/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cx1.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 *
 * @author ECH
 */
public class User extends Base implements Serializable {
    
    private static final long serialVersionUID = 1;
        
    private boolean admin;
    
    private String brokerID;    
    private String gmailID;
    private String yahooID;
    private String facebookID;
    
    private String email;
    private String password;

    private String name;
    private String firstName;
    private String lastName;
    
    private String title;
    private String description;
    private String notes;
    
    //CX: contact details
    
    private String emailPrimary;
    private String emailSecondary;
    
    private String landlinePrimary;
    private String landlineSecondary;
    
    private String mobilePrimary;
    private String mobileSecondary;
        
    //CX: references to objects
    
    //x
    private String userTypeID;
    //x
    private List<String> userTypeIDs = new ArrayList<String>(0);
    
    //x
    private String primaryPhotoID;
    
    private List<String> photoIDs = new ArrayList<String>(0);
    
    //x
    private List<String> contactIDs = new ArrayList<String>(0);    
    //x
    private List<String> companyIDs = new ArrayList<String>(0);
        
    //CX: referenced objects
        
    //x
    private UserType userType;
    //x
    private List<UserType> userTypes = new ArrayList<UserType>(0);
    
    //x
    private Photo primaryPhoto;
    
    private List<Photo> photos = new ArrayList<Photo>(0);
    
    //x
    private List<Contact> contacts = new ArrayList<Contact>(0);
    //x
    private List<Company> companies = new ArrayList<Company>(0);
    
    private Date lastLogin;
    
    public User() {
        
    }

    public User(String typeID, String email, String password) {
        this.userTypeID = typeID;
        this.email = email;
        this.password = password;
    }
    
    public User(String typeID, String name, String email, String password) {
        this.userTypeID = typeID;
        this.name = name;
        this.email = email;
        this.password = password;
    }

    public User(String id, String typeID, String name, String email, String password) {
        this.setId(id);
        this.userTypeID = typeID;
        this.name = name;
        this.email = email;
        this.password = password;
    }
    
    public User(String id, List<String> userTypeIDs, String name, String email, String password) {
        this.setId(id);
        this.userTypeIDs = userTypeIDs;
        this.name = name;
        this.email = email;
        this.password = password;
    }
    
    public User(String firstName, String lastName, String email, String password, String dummy1, String dummy2) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.email = email;
        this.password = password;
    }
    
    public String getUserTypeID() {
        return userTypeID;
    }

    public void setUserTypeID(String typeID) {
        this.userTypeID = typeID;
    }

    public String getBrokerID() {
        return brokerID;
    }

    public void setBrokerID(String brokerID) {
        this.brokerID = brokerID;
    }

    public String getGmailID() {
        return gmailID;
    }

    public void setGmailID(String gmailID) {
        this.gmailID = gmailID;
    }

    public String getYahooID() {
        return yahooID;
    }

    public void setYahooID(String yahooID) {
        this.yahooID = yahooID;
    }

    public String getFacebookID() {
        return facebookID;
    }

    public void setFacebookID(String facebookID) {
        this.facebookID = facebookID;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public List<Contact> getContacts() {
        return contacts;
    }

    public void setContacts(List<Contact> contacts) {
        this.setContacts(contacts);
    }

    public Photo getPrimaryPhoto() {
        return primaryPhoto;
    }

    public void setPrimaryPhoto(Photo primaryPhoto) {
        this.primaryPhoto = primaryPhoto;
    }

    public List<Photo> getPhotos() {
        return photos;
    }

    public void setPhotos(List<Photo> photos) {
        this.photos = photos;
    }

    public List<Company> getCompanies() {
        return companies;
    }

    public void setCompanies(List<Company> companies) {
        this.companies = companies;
    }

    public String getPrimaryPhotoID() {
        return primaryPhotoID;
    }

    public void setPrimaryPhotoID(String primaryPhotoID) {
        this.primaryPhotoID = primaryPhotoID;
    }

    public List<String> getPhotoIDs() {
        return photoIDs;
    }

    public void setPhotoIDs(List<String> photoIDs) {
        this.photoIDs = photoIDs;
    }

    public List<String> getContactIDs() {
        return contactIDs;
    }

    public void setContactIDs(List<String> contactIDs) {
        this.contactIDs = contactIDs;
    }

    public List<String> getCompanyIDs() {
        return companyIDs;
    }

    public void setCompanyIDs(List<String> companyIDs) {
        this.companyIDs = companyIDs;
    }

    public UserType getUserType() {
        return userType;
    }

    public void setUserType(UserType userType) {
        this.userType = userType;
    }

    public List<String> getUserTypeIDs() {
        return userTypeIDs;
    }

    public void setUserTypeIDs(List<String> userTypeIDs) {
        this.userTypeIDs = userTypeIDs;
    }

    public List<UserType> getUserTypes() {
        return userTypes;
    }

    public void setUserTypes(List<UserType> userTypes) {
        this.userTypes = userTypes;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public boolean isAdmin() {
        return admin;
    }

    public void setAdmin(boolean admin) {
        this.admin = admin;
    }

    public String getEmailPrimary() {
        return emailPrimary;
    }

    public void setEmailPrimary(String emailPrimary) {
        this.emailPrimary = emailPrimary;
    }

    public String getEmailSecondary() {
        return emailSecondary;
    }

    public void setEmailSecondary(String emailSecondary) {
        this.emailSecondary = emailSecondary;
    }

    public String getLandlinePrimary() {
        return landlinePrimary;
    }

    public void setLandlinePrimary(String landlinePrimary) {
        this.landlinePrimary = landlinePrimary;
    }

    public String getLandlineSecondary() {
        return landlineSecondary;
    }

    public void setLandlineSecondary(String landlineSecondary) {
        this.landlineSecondary = landlineSecondary;
    }

    public String getMobilePrimary() {
        return mobilePrimary;
    }

    public void setMobilePrimary(String mobilePrimary) {
        this.mobilePrimary = mobilePrimary;
    }

    public String getMobileSecondary() {
        return mobileSecondary;
    }

    public void setMobileSecondary(String mobileSecondary) {
        this.mobileSecondary = mobileSecondary;
    }   

    public Date getLastLogin() {
        return lastLogin;
    }

    public void setLastLogin(Date lastLogin) {
        this.lastLogin = lastLogin;
    }
   
}
